<style>
.affix{top:10px;}
.head-style-list li,.editor-template-list li{cursor: pointer;}
</style>

		<div class="ui-portlet">
			{{template wxes/_user_wxes}}
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;个人中心</a></li>
			  <li><a href="/tokens/mine">Token管理</a></li>
			  <li class="active">新增|编辑</li>
			</ol> 
		</div>          
       <hr>

{{$this->Form->create('Token',array('class'=>'form-horizontal','role'=>'form'))}}
		
	<div class="tab-content">
		<div role="tabpanel" class="tab-pane active" id="chi-info">
			
			<div class="form-group form-inline">
				<label class="col-sm-2 control-label" for="TokenAddress">Token</label>
				<div class="col-sm-10 controls">
					{{$this->Form->hidden('id')}}
					{{$this->Form->input('token',array('class'=>'form-control','style'=>'width:360px','div'=>false,'label'=>false,))}}
					<input type="button" value="随机生成" class="btn btn-default" onclick="$('#TokenToken').val(randomString(32))">
				</div>
				
			</div>
			
			<div class="form-group form-inline">
				<label class="col-sm-2 control-label" for="TokenName">Ecrypt Key</label>
				<div class="col-sm-10 controls">
					
					{{$this->Form->input('ecrypt_key',array('class'=>'form-control','style'=>'width:480px','required'=>'required', 'div'=>false,'label'=>false))}}
					<input type="button" value="随机生成" class="btn btn-default" onclick="$('#TokenEcryptKey').val(randomString(44))">
				</div>
				
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label" for="TokenName">状态</label>
				<div class="col-sm-10 controls">
					{{$this->Form->input('status',array('type'=>'select','default'=>0,'options'=>array(0=>'停用',1=>'启用'),'required'=>'required', 'class'=>'form-control','div'=>false,'label'=>false))}}
				</div>
			</div>
						
								
			<div class="form-group">
				<label class="col-sm-2 control-label" for="TokenBusinessHours">备注</label>
				<div class="col-sm-10 controls">
					{{$this->Form->input('remark',array('class'=>'form-control','rows'=>'3','div'=>false,'label'=>false,))}}
				</div>
			</div>
		</div>
	</div>
	
	
	<div class="form-group">
		<label class="col-sm-2 control-label"></label>
		<div class="col-sm-10"><input class="btn btn-primary" type="submit" value="提交"></div>
	</div>
{{$this->Form->end()}}

{{$this->Html->script(array(
	'ckeditor/ckeditor.js',
	'swfupload/swfupload.js',
	'swfupload/swfupload.queue.js',
	'swfupload/swfupload.cookies.js',
	'swfupload/fileprogress.js',
	'swfupload/handlers.js',
))}}
<script>

var current_ckeditor_instance = null;

$(function(){

	CKEDITOR.editorConfig = function( config ){
		config.toolbar = 'FRONT';
	}
	ckeditors['TokenContent'] = CKEDITOR.replace( 'TokenContent',
		    {
		        customConfig : '{{$this->Html->url("/js/ckeditor/front-config.js")}}'
		    });
	ckeditors['TokenContent'].on('focus',function(e){
		current_ckeditor_instance = e.editor;
	});
	
})

</script>
